#include "mstartscene.h"
#include "qtoolbutton.h"

mStartScene::mStartScene()
{
    //游戏开始界面，场景1
    mStartScene1=new QGraphicsScene;
    mStartScene1->setSceneRect(QRect(0,0,1716,1019));
    mStartScene1->addPixmap(QPixmap(":/new/prefix1/pic/startpic.png"));
    // 添加开始按钮
    startBtn = new QToolButton();
    startBtn->setAutoRaise(true);
    startBtn->setIcon(QIcon(":/new/prefix1/pic/gamestart.png"));
    startBtn->setIconSize(QSize(285,101));
    startBtn->move(200,800);
    startBtn->setStyleSheet("QToolButton { background: transparent; }");//使背景透明
    // 添加退出按钮
    closeBtn=new QToolButton();
    closeBtn->setAutoRaise(true);
    closeBtn->setIcon(QIcon(":/new/prefix1/pic/gamestop.png"));
    closeBtn->setIconSize(QSize(285,101));
    closeBtn->move(1200,800);
    closeBtn->setStyleSheet("QToolButton { background: transparent; }");
    // 添加退出按钮
    InsBtn=new QToolButton();
    InsBtn->setAutoRaise(true);
    InsBtn->setIcon(QIcon(":/new/prefix1/pic/SceneInstructions.png"));
    InsBtn->setIconSize(QSize(307,87));
    InsBtn->move(700,700);
    InsBtn->setStyleSheet("QToolButton { background: transparent; }");
    //向场景1中添加按钮
    mStartScene1->addWidget(startBtn);
    mStartScene1->addWidget(closeBtn);
    mStartScene1->addWidget(InsBtn);
}
mStartScene::~mStartScene()
{
    delete mStartScene1;
    delete startBtn;
    delete closeBtn;
}
